package com.wd.cloud.applet.common.exception;

import com.wd.cloud.applet.common.Response;
import java.io.Serializable;

public class CustomException extends RuntimeException implements Serializable {

    private static final long serizlVersionUID = 1L;

    private int code = 104;



    private Object data;

    public CustomException(){ super();}

    public CustomException(String message){ super(message);}

    public CustomException(String message, int code){
        super(message);
        this.code = code;

    }

    public CustomException(Response response){
        super(response.getMessage());
        this.code = response.getCode();
        this.data = response.getData();
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }




















}
